//
//  STOrderInfoView.m
//  YiYueStore
//
//  Created by zhouzhouzhou on 2018/9/29.
//  Copyright © 2018年 YuYiLian. All rights reserved.
//

#import "STOrderInfoView.h"

#import "STUserInfoView.h"
#import "STOrderOverView.h"
//#import "STOrderExtraView.h"
#import "STOrderPriceOverView.h"
#import "STOrderFooter1View.h"


@implementation STOrderInfoView{
//    UIView * orderExtraView;
//    UIView * orderFooterView;
}


-(id)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    infoFrame = frame;
    return self;
}

-(void)loadUserInfoView{
    STUserInfoView * userView = [[STUserInfoView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 200)];
    [userView setUserInfoWithData:nil];
    [self addSubview:userView];
    
}


-(void)setOrderInfoViewWithType:(NSInteger)type withData:(id)data{
    //加载服务项目
    STOrderOverView * orderProView = [[STOrderOverView alloc]initWithFrame:CGRectMake(0, 200, SCREEN_WIDTH, 200)];
    [orderProView setOrderOverViewWithType:(int)type data:data];
    [self addSubview:orderProView];
    
    //加载其他信息（申请处理，价格说明等）
    STOrderPriceOverView * orderExtraView = [[STOrderPriceOverView alloc]initWithFrame:CGRectMake(0, 400, SCREEN_WIDTH, 200)];
    [orderExtraView setOrderPriceOverWithType:(int)type data:data];
    [self addSubview:orderExtraView];
    
    
    //加载footer
//    STOrderFooter1View * orderFooterView = [[STOrderFooter1View alloc]initWithFrame: CGRectMake(0, SCREEN_HEIGHT-64, SCREEN_WIDTH, 64)];
//    [orderFooterView performSelector:@selector(setOrderFooterView:) withObject:nil];
//    [self addSubview:orderFooterView];
    
}


/*
 订单详情种类
 0 ：待处理 修改预约时间的 (别人的申请)                     1 : 待处理 修改预约时间的(自己的申请 取消申请/提醒)
 2 ：待处理 退款的（别人的申请）                           3 : 待处理 退款的（自己的申请 取消申请/提醒）
 4 ：待处理 退款（ 双方皆同意后 ，平台72小时处理退款）         5 ：待核销 服务正在进行中（待确认完成/加价）
 6 ：待核销 用户（取消订单）                              7 : 待核销 美发师（取消订单/开始服务）
 8 ： 已完成 服务成功结束（已评价）                         9 : 已完成 服务成功结束（未评价）
10 ： 已退款
 ***/




//-(void)loadExtraViewWithType:(NSInteger)type data:(id)data{
//    if (type == 0 || type == 1 ) {
//        orderExtraView = [[STOrderExtraView alloc] initWithFrame:CGRectMake(0, 400, SCREEN_WIDTH, 200)];
//        [orderExtraView performSelector:@selector(setOrderExtraWithData:) withObject:data];
//        
//    }else if (type == 2 ||type == 3){
//        orderExtraView = [[STOrderCancelView alloc] initWithFrame:CGRectMake(0, 400, SCREEN_WIDTH, 200)];
//        [orderExtraView performSelector:@selector(setOrderCancelWithData:) withObject:data];
//    }else if (type == 4 || type == 6|| type == 7){
//        if (orderExtraView) {
//            [orderExtraView removeFromSuperview];
//        }
//    }else if (type == 5 || type == 8 ||type == 9 ){
//        orderExtraView = [[STOrderPriceView alloc] initWithFrame:CGRectMake(0, 400, SCREEN_WIDTH, 200)];
//        [orderExtraView performSelector:@selector(setOrderPriceWithData:) withObject:data];
//    }else if (type == 10 ){
//        
//    }
//    [self addSubview:orderFooterView];
//}

//-(void)loadFooterViewWithType:(NSInteger)type data:(id)data{
//    orderFooterView = [[STOrderFooter1View alloc]initWithFrame: CGRectMake(0, SCREEN_HEIGHT-64, SCREEN_WIDTH, 64)];
//    [orderFooterView performSelector:@selector(setOrderFooterView:) withObject:nil];
//    [self addSubview:orderFooterView];
//}




@end
